#!/bin/bash

dateStr=`date "+%Y%m%d"`
hive -e "use default; insert into table user_info select count(distinct id) as active_num, collect_set(dt)[0] as datestr from user_clicks group by$dateStr"
